#pragma GCC optimize(2)
#include <bits/stdc++.h>

using namespace std;
#define int long long
const int inf = 0x3f3f3f3f3f3f3f3f;

void solve()
{
	int n;
	cin >> n;
	vector<int> a;
	int ans = 0;
	for (int i = 0; i < n; i++)
	{
		int x;
		cin >> x;
		if (x % 2 == 0) ans += x;
		else a.push_back(x);
	}
	if (a.empty())
	{
		cout << 0 << '\n';
		return;
	}
	sort(a.begin(), a.end());
	int pos = a.size() / 2;
	for (int i = pos; i < a.size(); i++) ans += a[i];
	cout << ans << '\n';
}

signed main()
{
	ios_base::sync_with_stdio(false);
	cin.tie(0);
	cout.tie(0);
	int _ = 1;
	cin >> _;
	while (_--)
	{
		solve();
	}
	return 0;
}